Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add more detail to the basic example #1043

Merged
merged 5 commits into from
Feb 19, 2020
Merged

Conversation

barakplasma
Copy link
Contributor

This change only affects the project documentation.

What

This change adds more details to the basic example. These details show a new user what to expect from the library.

Why

As a beginning user of this library, I didn't know what the basic functions returned until I set up a redis server and a notebook to test it out myself. I want to

Notes

I tested the proposed file changes at https://runkit.com/barakplasma/ioredis-basic-operations .

This change adds more details to the basic example. These details show a new user what to expect from the library.
Copy link
Collaborator

@luin luin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! Overall it looks great to me, just left some comments on the minor things.

examples/basic_operations.js Outdated Show resolved Hide resolved
examples/basic_operations.js Outdated Show resolved Hide resolved
examples/basic_operations.js Outdated Show resolved Hide resolved
@barakplasma
Copy link
Contributor Author

barakplasma commented Jan 14, 2020

Hi @luin ,

May I also update the README.md example?
EDIT: decided to update the README.md file as well

@barakplasma barakplasma requested a review from luin January 14, 2020 11:59

// ioredis supports all Redis commands:
redis.set("foo", "bar");
redis.set("foo", "bar"); // returns promise which resolves to string, "OK"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm considering putting all of this within an async function so that we can async/await some of the commands. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late response! Yes I think that would be helpful but still we should keep some examples for callback-style. I'm going to merge this pr so feel free to create a new pr for the proposal. Thanks again for the contribution!

@stale
Copy link

stale bot commented Feb 18, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 7 days if no further activity occurs, but feel free to re-open a closed issue if needed.

@stale stale bot added the wontfix label Feb 18, 2020

// ioredis supports all Redis commands:
redis.set("foo", "bar");
redis.set("foo", "bar"); // returns promise which resolves to string, "OK"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late response! Yes I think that would be helpful but still we should keep some examples for callback-style. I'm going to merge this pr so feel free to create a new pr for the proposal. Thanks again for the contribution!

@stale stale bot removed the wontfix label Feb 19, 2020
@luin luin merged commit 4a13a1b into redis:master Feb 19, 2020
@ioredis-robot
Copy link
Collaborator

🎉 This PR is included in version 4.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants